<html>
<head><meta charset="utf-8"><title>crossbuilding libstd · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/crossbuilding.20libstd.html">crossbuilding libstd</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="192926956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/crossbuilding%20libstd/near/192926956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/crossbuilding.20libstd.html#192926956">(Apr 04 2020 at 21:02)</a>:</h4>
<p>What’s the go-to way nowadays to build a libstd for some target that rustc knows but does not ship libstd for?</p>



<a name="192927231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/crossbuilding%20libstd/near/192927231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/crossbuilding.20libstd.html#192927231">(Apr 04 2020 at 21:10)</a>:</h4>
<p>locally? probably just <code>x.py build --target &lt;target&gt; src/libtest</code>, possibly with --stage 1</p>



<a name="192927250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/crossbuilding%20libstd/near/192927250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/crossbuilding.20libstd.html#192927250">(Apr 04 2020 at 21:10)</a>:</h4>
<p>and if you want it in some other project I suspect -Zbuild-std would also just work</p>



<a name="192927321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/crossbuilding%20libstd/near/192927321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/crossbuilding.20libstd.html#192927321">(Apr 04 2020 at 21:12)</a>:</h4>
<p>I want to test a target that does not have a libstd prebuilt in github actions. So preferably it does not involve pulling down the whole rust repo.</p>



<a name="192927337"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/crossbuilding%20libstd/near/192927337" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/crossbuilding.20libstd.html#192927337">(Apr 04 2020 at 21:13)</a>:</h4>
<p>-Zbuild-std might just work.</p>



<a name="192928240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/crossbuilding%20libstd/near/192928240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/crossbuilding.20libstd.html#192928240">(Apr 04 2020 at 21:40)</a>:</h4>
<p>I think you need the rust-src component for build-std, but that'd be my recommendation</p>



<a name="192928241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/crossbuilding%20libstd/near/192928241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/crossbuilding.20libstd.html#192928241">(Apr 04 2020 at 21:41)</a>:</h4>
<p>if it doesn't work I guess xargo or something might</p>



<a name="192929465"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/crossbuilding%20libstd/near/192929465" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/crossbuilding.20libstd.html#192929465">(Apr 04 2020 at 22:11)</a>:</h4>
<p>Turns out getting <code>gcc</code> toolchain for said targets is likely to be the biggest problem. I filled <a href="https://github.com/rust-lang/wg-cargo-std-aware/issues/54" title="https://github.com/rust-lang/wg-cargo-std-aware/issues/54">https://github.com/rust-lang/wg-cargo-std-aware/issues/54</a> for that..</p>



<a name="192945392"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/crossbuilding%20libstd/near/192945392" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/crossbuilding.20libstd.html#192945392">(Apr 05 2020 at 06:57)</a>:</h4>
<p>In the slight chance that it is helpful, Miri can run code for pretty much any target without a toolchain. ;)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>